<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div:not(#app) {
            width: 200px;
            height: 200px;
            background: rgb(170, 154, 62);
            font-size: 50px;
            text-align: center;
            line-height: 200px;
            color: #fff;
        }

        .box2 {
            width: 200px;
            height: 200px;
            background: rgb(62, 170, 107);
            font-size: 50px;
            text-align: center;
            line-height: 200px;
            color: #fff;
        }
    </style>
</head>

<body>
    <div id="app">
        <button @click="isShow = !isShow">{{ isShow?'消失':'显示'  }}</button>
        <div class="box" v-if="isShow">
            div1
        </div>
        <p class="box2" v-else>
            div2
        </p>

        <div v-if=" 2>3 ">dwdwdw</div>
    </div>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el: "#app",
            data: {
                isShow: false
            },
            methods: {

            }

        })
    </script>
</body>

</html>